// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from 'axios'
import VueAxios from 'vue-axios'
import Api from './api/index'
import icons from './assets/icons/icons.css'
import styleCss from './assets/css/style.css'
import common from './utils/common'
import vuex from 'vuex'
import store from './store/store'
import {Cookies,getToken,setToken,removeToken,getUid,setUid,removeUid} from './assets/js/jsCookie.js'
import 'froala-editor/css/froala_editor.pkgd.min.css'
import 'froala-editor/css/froala_style.min.css'
import 'froala-editor/js/froala_editor.pkgd.min.js'
import 'froala-editor/js/languages/zh_cn.js'
import 'froala-editor/js/plugins.pkgd.min.js'
import VueFroala from 'vue-froala-wysiwyg'

Vue.use(VueFroala)

Vue.prototype.cookies = {getToken,setToken,removeToken,getUid,setUid,removeUid}
Vue.use(vuex);
Vue.use(VueAxios, axios)
Vue.use(ElementUI);
Vue.config.productionTip = false
Vue.prototype.$axios = Api;
Vue.prototype.common = common;

new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>',
  beforeCreate(){
    // 需要在全局添加一个属性
    Vue.prototype.$bus = this
  }
})
